Error Handling
Detail how the API handles errors, including common HTTP status codes and their meanings.
200 OK
: The request has succeeded, and the server has returned the expected data.
400 Bad Request
: The server could not understand the request due to invalid data.
401 Unauthorized
: The client doesn’t have correct authentication credentials.
403 Forbidden
: The server is refusing to respond. This is typically caused by incorrect access scopes.
404 Not Found
: The requested resource was not found but could be available again in the future.
422 Unprocessable Entity
: The request body contains semantic errors. This is typically caused by incorrect formatting, omitting required fields, or logical errors such as initiating a checkout for an out-of-stock product.
429 Too Many Requests
: The client has exceeded the rate limit.